package com.finance.action.android.customer;

import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.common.vo.JsonVo;
import com.finance.entity.customer.CallRecordInfo;
import com.finance.service.customer.CallRecordInfoService;

@Controller("CallRecordInfoAction")
public class CallRecordInfoAction {

	@Resource(name = "CallRecordInfoService")
	private CallRecordInfoService callRecordInfoService;
	
	/**
	 * 添加通话记录
	 * @param kfUserId 客户id
	 * @param callAddress 通话地点
	 * @param callDateTime 通话时间
	 * @param callTimeLength 通话时长
	 * @param callType 通话类型
	 * @param mobileNo mobileNo
	 * @return
	 */
	@ResponseBody
	@RequestMapping("addcallRecordInfo")
	public JsonVo<String> addcallRecordInfo(String kfUserId,
			String callAddress, Date callDateTime, Date callTimeLength,
			Integer callType,String mobileNo) {
		JsonVo<String> json = new JsonVo<String>();
		CallRecordInfo callRecordInfo = new CallRecordInfo();
		callRecordInfo.setKfUserId(kfUserId);
		callRecordInfo.setCallAddress(callAddress);
		callRecordInfo.setCallDateTime(callDateTime);
		callRecordInfo.setCallType(callType);
		callRecordInfo.setMobileNo(mobileNo);
		callRecordInfoService.insert(callRecordInfo);
		json.setCode(200);
		json.setMsg("成功");
		json.setSuccess(true);
		return json;
	}

}
